package br.com.single.modelo.estoque;

import java.util.Date;

import br.com.single.publico.Cdfornec;
import br.com.single.publico.Cditemtabelageneri;
import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.roo.addon.dbre.RooDbManaged;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;


@RooJavaBean
@RooToString
@RooJpaActiveRecord(versionField = "", table = "mvfrete", schema = "estoque")
@RooDbManaged(automaticallyDelete = true)
public class Mvfrete{

	@OneToOne
    @JoinColumn(name = "sequenmovime", nullable = false, insertable = false, updatable = false)
    private Mvmovimeestoqu mvmovimeestoqu;

	@ManyToOne
    @JoinColumn(name = "cfop", referencedColumnName = "codigocfop",columnDefinition="cfop")
    private Cdnatureoperac cfop;

	@ManyToOne
    @JoinColumn(name = "transp", referencedColumnName = "codigofornec",columnDefinition="codigonumero")
    private Cdfornec transp;

	@ManyToOne
    @JoinColumns({ @JoinColumn(name = "tabelatf", referencedColumnName = "codigotabela",columnDefinition="bpchar"), @JoinColumn(name = "tipofrete", referencedColumnName = "elementabela",columnDefinition="classisimple") })
    private Cditemtabelageneri cditemtabelageneri;

	@ManyToOne
    @JoinColumns({ @JoinColumn(name = "tabelafp", referencedColumnName = "codigotabela",columnDefinition="bpchar"), @JoinColumn(name = "formapagame", referencedColumnName = "elementabela",columnDefinition="classisimple") })
    private Cditemtabelageneri cditemtabelageneri1;

	@ManyToOne
    @JoinColumns({ @JoinColumn(name = "tabelatc", referencedColumnName = "codigotabela",columnDefinition="bpchar"), @JoinColumn(name = "tipocobran", referencedColumnName = "elementabela",columnDefinition="classisimple") })
    private Cditemtabelageneri cditemtabelageneri2;

	@Temporal(TemporalType.DATE)
	@Column(name = "dataemissa",columnDefinition="data")
    private Date dataemissa;

	@Column(name = "modelodocume", length = 2,columnDefinition="bpchar")
    private String modelodocume;

	@Column(name = "seriedocume",columnDefinition="classisimple")
    private String seriedocume;

	@Column(name = "subseriedocume",columnDefinition="classisimple")
    private String subseriedocume;

	@Column(name = "numerodocume",columnDefinition="int4")
    private Integer numerodocume;

	@Column(name = "valordocume",columnDefinition="valorsimple")
    private Double valordocume;

	@Column(name = "valorbaseicms",columnDefinition="valorsimple")
    private Double valorbaseicms;

	@Column(name = "valortotalmercad",columnDefinition="valorsimple")
    private Double valortotalmercad;

	public Mvmovimeestoqu getMvmovimeestoqu() {
        return mvmovimeestoqu;
    }

	public void setMvmovimeestoqu(Mvmovimeestoqu mvmovimeestoqu) {
        this.mvmovimeestoqu = mvmovimeestoqu;
    }

	public Cdnatureoperac getCfop() {
        return cfop;
    }

	public void setCfop(Cdnatureoperac cfop) {
        this.cfop = cfop;
    }

	public Cdfornec getTransp() {
        return transp;
    }

	public void setTransp(Cdfornec transp) {
        this.transp = transp;
    }

	public Cditemtabelageneri getCditemtabelageneri() {
        return cditemtabelageneri;
    }

	public void setCditemtabelageneri(Cditemtabelageneri cditemtabelageneri) {
        this.cditemtabelageneri = cditemtabelageneri;
    }

	public Cditemtabelageneri getCditemtabelageneri1() {
        return cditemtabelageneri1;
    }

	public void setCditemtabelageneri1(Cditemtabelageneri cditemtabelageneri1) {
        this.cditemtabelageneri1 = cditemtabelageneri1;
    }

	public Cditemtabelageneri getCditemtabelageneri2() {
        return cditemtabelageneri2;
    }

	public void setCditemtabelageneri2(Cditemtabelageneri cditemtabelageneri2) {
        this.cditemtabelageneri2 = cditemtabelageneri2;
    }

	public Date getDataemissa() {
        return dataemissa;
    }

	 public void setDataemissa(Date dataemissa) {
        this.dataemissa = dataemissa;
    }

	public String getModelodocume() {
        return modelodocume;
    }

	public void setModelodocume(String modelodocume) {
        this.modelodocume = modelodocume;
    }

	public String getSeriedocume() {
        return seriedocume;
    }

	public void setSeriedocume(String seriedocume) {
        this.seriedocume = seriedocume;
    }

	public String getSubseriedocume() {
        return subseriedocume;
    }

	public void setSubseriedocume(String subseriedocume) {
        this.subseriedocume = subseriedocume;
    }

	public Integer getNumerodocume() {
        return numerodocume;
    }

	public void setNumerodocume(Integer numerodocume) {
        this.numerodocume = numerodocume;
    }

	public Double getValordocume() {
        return valordocume;
    }

	public void setValordocume(Double valordocume) {
        this.valordocume = valordocume;
    }

	public Double getValorbaseicms() {
        return valorbaseicms;
    }

	public void setValorbaseicms(Double valorbaseicms) {
        this.valorbaseicms = valorbaseicms;
    }

	public Double getValortotalmercad() {
        return valortotalmercad;
    }

	public void setValortotalmercad(Double valortotalmercad) {
        this.valortotalmercad = valortotalmercad;
    }
}
